﻿/*   特效类
1000000-1001000内为剑光系统
1001001-1002000为残影系统
1002001-1003000为闪电动画层
1003001-1004000为粒子层
*/
import Debug;
class Effect {
	// 变量
	//构造函数
	//静态特效函数
	//------------------------- 创建粒子系统  tag-系统产生位置
	public static function createParticle(tag:MovieClip):Object {
		if (tag == undefined) {
			trace("创建粒子系统失败,创建域不正确!");
			return null;
		}
		if (tag["particleEffect"] != undefined) {
			return tag["particleEffect"].obj;
		}
		var d:Number = tag.getNextHighestDepth();
		if (d<=0) {
			d = 1;
		} else if (d>1040000) {
			d = 1003000+int(Math.random()*1000);
			while (tag.getInstanceAtDepth(d) != undefined) {
				d = 1003000+int(Math.random()*1000);
			}
		}
		tag.createEmptyMovieClip("particleEffect", d);
		tag.createEmptyMovieClip("particleShowEffect", d+1);
		var obj:Object = new Object();
		obj.tag = tag["particleEffect"];
		obj.effTag = tag["particleShowEffect"];
		obj.tag.jsq = 0;
		//-------------------------- 效果函数部分
		obj.stop = function() {
			this.stopf = true;
			this.tag.removeMovieClip();
			this.effTag.removeMovieClip();
		};
		//-----线性粒子
		obj.lineParticle = function() {
		};
		//-----放射性粒子(尘)
		obj.radialParticle1 = function(tag:MovieClip, x:Number, y:Number, link:String, n:Number) {
		};
		//-----放射性粒子(溅射性火星)   link-用于火星部件的LINKAGE, x-发射点X, y-发射点Y, rv-速度向量值, va-加速度向量值, color-默认火星色彩值, life-生命衰减值, g-重力加速度, n-火星数量, cy-是否有火星残影
		obj.radialParticle2 = function(link:String, x:Number, y:Number, rv:Number, va:Number, color:String, life:Number, g:Number, n:Number, cy:Boolean) {
			var tag = this.tag;
			if (cy == undefined) {
				cy == true;
			}
			if (rv == undefined) {
				rv = 15;
			}
			if (va == undefined) {
				va = -0.18;
			}
			if (n<0 || n == undefined) {
				n = 10;
			}
			if (g == undefined) {
				g = 0.2;
			}
			if (color == undefined && (link == null || link == "")) {
				color = "0xff0000";
			}
			if (link == "") {
				link == null;
			}
			if (life<0 || life == undefined) {
				life = 10;
			}
			var i = 0;
			while (i<n) {
				var subtag:MovieClip;
				if (link == null) {
					tag.createEmptyMovieClip("rp"+tag.jsq.toString(), tag.jsq);
					subtag = this.drawBox(tag["rp"+tag.jsq.toString()], 4, "0xffffff", color);
				} else {
					tag.attachMovie(link, "rp"+tag.jsq.toString(), tag.jsq);
					subtag = tag["rp"+tag.jsq.toString()];
				}
				subtag._x = x;
				subtag._y = y;
				subtag._alpha = 100;
				subtag.life = life;
				subtag.va = va;
				subtag.g = g;
				subtag.hd = Math.random()*Math.PI*2-Math.PI;
				subtag.vx = Math.random()*rv*Math.cos(subtag.hd);
				subtag.vy = Math.random()*rv*Math.sin(subtag.hd);
				subtag.onEnterFrame = function() {
					if (this._alpha<=0) {
						this.removeMovieClip();
					} else {
						this._alpha -= this.life;
						this.vy += this.va*Math.sin(this.hd)+this.g;
						this.vx += this.va*Math.cos(this.hd);
						this._x += this.vx;
						this._y += this.vy;
					}
				};
				//----------------- 残影
				Effect.createShadow(subtag);
				//=====================
				i++;
				tag.jsq += 10;
			}
			this.___jsq();
		};
		//--------------------------------------
		//----- 计数器维护
		obj.___jsq = function() {
			if (this.jsq>1200000) {
				this.jsq = 0;
			}
		};
		//----- 画Box
		obj.drawBox = function(tag:MovieClip, h:Number, lc, fc) {
			if (tag == undefined) {
				return tag;
			}
			if (h<0 || h == undefined) {
				h = 1;
			}
			if (lc>0 && lc != undefined) {
				tag.lineStyle(0, lc, 100);
			}
			if (fc == undefined) {
				fc = "0xff0000";
			}
			tag.beginFill(fc, 100);
			tag.moveTo(0, 0);
			tag.lineTo(h, 0);
			tag.lineTo(h, h);
			tag.lineTo(0, h);
			tag.lineTo(0, 0);
			tag.endFill();
			return tag;
		};
		obj.tag.obj = obj;
		return obj;
	}
	//------------------------- 创建闪电 tag-闪电出现的位置, x0-起始点X, y0-起始点Y, x1-终点X, y1-终点Y, color-着色(默认浅蓝), alpha-透明度(默认100), n-电光折数(默认8折), once-是否只闪动1帧(默认不是), l-要不要加上光晕(默认是有的)
	public static function createLight(tag:MovieClip, x0:Number, y0:Number, x1:Number, y1:Number, color:String, alpha:Number, n:Number, once:Boolean, l:Boolean):Object {
		if (tag == undefined || x0 == undefined || y0 == undefined || x1 == undefined || y1 == undefined) {
			trace("闪电:电光mc或起止点位置不正确.");
			return null;
		}
		if (color == undefined) {
			color = "0033ff";
		}
		if (n<=0 || n == undefined) {
			n = 8;
		}
		if (l == undefined) {
			l = true;
		}
		if (alpha == undefined) {
			alpha = 100;
		}
		if (once == undefined) {
			once = false;
		}
		var dd:Number = tag.getNextHighestDepth();
		dd = ((dd>1022000) ? (1002000+int(Math.random()*1000)) : ((dd<=0) ? 1 : dd));
		while (tag.getInstanceAtDepth(dd) != undefined) {
			dd = 1002000+int(Math.random()*1000);
		}
		var d:Number = int(Math.random()*10000);
		if (tag["l"+d.toString()] != undefined) {
			while (tag["l"+d.toString()] == undefined) {
				d = int(Math.random()*10000);
			}
		}
		tag.createEmptyMovieClip("l"+d.toString(), dd);
		tag.obj = new Object();
		var tago = tag.obj;
		tago.tag = tag["l"+d.toString()];
		tago.tag.alpha = alpha;
		tago.tag.once = once;
		tago.tag.onceJSQ = 0;
		tago.tag.obj = tago;
		tago.tag.pointS = {x:x0, y:y0};
		tago.tag.pointE = {x:x1, y:y1};
		tago.tag.pointL = {x:x1-x0, y:y1-y0};
		tago.tag.L = Math.pow(((tago.tag.pointL.x*tago.tag.pointL.x)+(tago.tag.pointL.y*tago.tag.pointL.y)), 0.5);
		tago.tag.l = l;
		tago.tag.color = color;
		tago.tag.n = n;
		tago.tag.onEnterFrame = function() {
			if (this.onceJSQ++>1 && this.once) {
				this.obj.stop();
				return;
			}
			this.obj.draw(this);
		};
		tago.draw = function(me) {
			me.onceJSQ++;
			me.clear();
			me.lineStyle(0, me.color, me.alpha);
			me.moveTo(me.pointS.x, me.pointS.y);
			var i = 1;
			var x = me.pointS.x;
			var y = me.pointS.y;
			while (i<=n) {
				me.lineStyle(0, me.color, me.alpha);
				var xm:Number = 0;
				var ym:Number = 0;
				if (i != n) {
					var ll = (me.L>100) ? 100 : me.L;
					xm = Math.random()*ll/3-ll/6;
					ym = Math.random()*ll/3-ll/6;
				}
				var xx:Number = (me.pointS.x+me.pointL.x*i/n)+(xm);
				var yy:Number = (me.pointS.y+me.pointL.y*i/n)+(ym);
				me.lineTo(xx, yy);
				if (me.l) {
					me.lineStyle(5, me.color, 11);
					me.moveTo(x, y);
					me.lineTo(xx, yy);
				}
				x = xx;
				y = yy;
				i++;
			}
		};
		tago.stop = function() {
			delete this.tag.onEnterFrame;
			this.tag.removeMovieClip();
			delete this;
		};
		tago.draw(tago.tag);
		return tago;
	}
	//------------------------- 剑光系统  tag-剑，l-剑长度, color-颜色，n-剑光数量，parent-剑光显示位置
	public static function createSwordShadow(tag:MovieClip, l:Number, color:String, n:Number, parent:MovieClip):Object {
		if (tag == undefined) {
			return null;
		}
		if (color == undefined) {
			color = "0x0000FF";
		}
		if (n<0 || n == undefined) {
			n = 8;
		}
		if (l<=0 || l == undefined) {
			l = tag._height;
		}
		var d:Number = 0;
		if (parent == undefined) {
			parent = tag._parent;
		}
		d = parent.getNextHighestDepth();
		if (d>1040000) {
			d = int(Math.random()*1000)+1000000;
			while (parent.getInstanceAtDepth(d) != undefined) {
				d = int(Math.random()*1000)+1000000;
			}
		}
		trace("剑光层深度"+d);
		var mcName:String = "swordShadowEffect";
		var mc:String = mcName+(int(Math.random()*1000)).toString();
		while (tag[mc] != undefined) {
			mc = mcName+(int(Math.random()*1000)).toString();
		}
		parent.createEmptyMovieClip(mc, d);
		var objName:String = "swordShadowEffectObj";
		var obj:String = objName+(int(Math.random()*1000)).toString();
		while (parent[obj] != undefined) {
			obj = objName+(int(Math.random()*1000)).toString();
		}
		parent[obj] = {};
		parent[obj].stag = parent[mc];
		parent[obj].stag.obj = parent[obj];
		parent[obj].h = l;
		parent[obj].tag = tag;
		parent[obj].color = color;
		parent[obj].point = new Array(n);
		parent[obj].getPoint = function(tag:MovieClip, p:String) {
			//trace(tag._parent+" "+this.stag);
			if (tag._parent == this.stag._parent) {
				return (tag[p]);
			} else {
				return (parent[obj].getPoint(tag._parent, p)+tag[p]);
			}
		};
		parent[obj].drawShadow = function() {
			var pa = this.point;
			this.stag.clear();
			for (var i = 0; i<pa.length; i++) {
				if (pa[(i+1)] != undefined && pa[(i)] != undefined) {
					this.stag.beginFill(this.color, 80*Math.pow(0.75, (pa.length-i)));
					this.stag.moveTo(pa[i].p1.x, pa[i].p1.y);
					this.stag.lineTo(pa[i].p2.x, pa[i].p2.y);
					this.stag.lineTo(pa[(i+1)].p2.x, pa[(i+1)].p2.y);
					this.stag.lineTo(pa[(i+1)].p1.x, pa[(i+1)].p1.y);
					this.stag.endFill();
				}
			}
		};
		parent[obj].stop = function() {
			this.stopf = true;
		};
		parent[obj].swordShadowEffectFun = function() {
			var me = this.obj;
			if (eval(me.tag) == undefined) {
				me.stopf = true;
			}
			if (me.stopf == true) {
				me.stag.removeMovieClip();
				//clearInterval(me.InterTime);
				delete me;
				return;
			}
			var hd = me.tag._rotation*Math.PI/180;
			var o:Object = new Object();
			o.p1 = new Object();
			o.p2 = new Object();
			o.p1.x = me.getPoint(me.tag, "_x");
			o.p1.y = me.getPoint(me.tag, "_y");
			o.p2.x = o.p1.x+me.h*Math.cos(hd)*tag._xscale/100;
			o.p2.y = o.p1.y+me.h*Math.sin(hd)*tag._xscale/100;
			me.point.push(o);
			me.point.shift();
			me.drawShadow();
		};
		parent[obj].stag.onEnterFrame = parent[obj].swordShadowEffectFun;
		//parent[obj].InterTime = setInterval(parent[obj].swordShadowEffectFun, 40, parent[obj]);
		return parent[obj];
	}
	//------------------------- 残影系统  tag-要加残影的目标，n-残影数量，pl-残影拖尾长度，alpha-起始透明度
	public static function createShadow(tag:MovieClip, n:Number, pl:Number, alpha:Number):Object {
		if (tag == undefined) {
			return null;
		}
		if (n<0 || n == undefined) {
			n = 6;
		}
		if (pl<=0 || pl == undefined) {
			pl = 30;
		}
		if (alpha<0 || alpha == undefined) {
			alpha = 40;
		}
		var d:Number = 0;
		
		d = tag._parent.getNextHighestDepth();
		if (d>1040000) {
			d = int(Math.random()*1000)+1001000;
			while (tag._parent.getInstanceAtDepth(d) != undefined) {
				d = int(Math.random()*1000)+1001000;
			}
		}
		
		
		//trace("残影层深度"+d);
		var objName:String = "shadowEffect";
		var obj:String = objName+(int(Math.random()*1000)).toString();
		while (tag[obj] != undefined) {
			obj = objName+(int(Math.random()*1000)).toString();
		}
		tag.swapDepths((d+n));
		tag[obj] = {};
		tag[obj].alpha = alpha;
		tag[obj].tag = tag;
		tag[obj].d = d;
		tag[obj].n = n;
		tag[obj].showlist = new Array();
		tag[obj].lastOne = null;
		tag[obj].stop = function() {
			this.stopf = true;
		};
		tag[obj].shadowEffectFun = function(me) {
			if (eval(me.tag) == undefined) {
				me.stopf = true;
			}
			if (me.stopf == true) {
				for (var i in me.showlist) {
					me.showlist[i].tag.removeMovieClip();
				}
				me.tag.swapDepths(me.d-1);
				clearInterval(me.InterTime);
				return;
			}
			for (var i = 0; i<me.showlist.length; i++) {
				if (me.showlist[i].tag != undefined && me.showlist[i].d>me.d) {
					me.showlist[i].tag.swapDepths((me.showlist[i].d-1));
					me.showlist[i].d = (me.showlist[i].d-1);
					me.showlist[i].tag._alpha = (me.alpha*Math.pow(0.7, (me.showlist.length-i)))+0.1;
				} else {
					var old = me.showlist.shift();
					old.tag.removeMovieClip();
					i--;
				}
			}
			var names:String = "___shadowMoveClip";
			var shadowName:String = names+(int(Math.random()*100)).toString();
			var w:Boolean = true;
			while (w) {
				w = false;
				shadowName = names+(int(Math.random()*100)).toString();
				for (var i in me.showlist) {
					if (me.showlist[i].tag._name == shadowName) {
						w = true;
						break;
					}
				}
			}
			var shadowObj = me.tag.duplicateMovieClip(shadowName, (me.d+me.n-1));
			shadowObj.gotoAndStop(me.tag._currentframe);
			me.showlist.push({tag:shadowObj, d:(me.d+me.n-1)});
			shadowObj._alpha = me.alpha;
		};
		tag[obj].InterTime = setInterval(tag[obj].shadowEffectFun, pl, tag[obj]);
		return tag[obj];
	}
	//------------------------- 创建重力场 tag-重力场系统生成位置，g-重力场加速度
	public static function createGravity(tag:MovieClip, g:Number):MovieClip {
		if (tag.Gravity == undefined) {
			var d:Number = tag.getNextHighestDepth();
			d = ((d<=0) ? 1 : ((d>1020000) ? 1020000 : d));
			trace("重力场层深："+d);
			tag.createEmptyMovieClip("makeGravity", d);
			var tag1 = tag.makeGravity;
			tag1.GA = new Array();
			tag1.G = g;
			tag1.onEnterFrame = function() {
				if (this.GA.length>0 && this._parent.enable) {
					for (var i in this.GA) {
						this.GA[i].tag._y += this.GA[i].v;
						this.GA[i].v += this.G;
					}
				}
			};
			tag.enable = true;
			tag.setV = function(tag:MovieClip, v:Number) {
				var A = this.makeGravity.GA;
				if (tag == undefined || A.length<=0) {
					return false;
				} else {
					if (v == undefined) {
						v = 0;
					}
					for (var i in A) {
						if (A[i].tag == tag) {
							A[i].v = v;
							return true;
						}
					}
					return false;
				}
			};
			tag.removeGravity = function() {
				if (this.makeGravity != undefined) {
					delete this.makeGravity.onEnterFrame;
					this.makeGravity.removeMovieClip();
					delete this.unbindG;
					delete this.bindG;
					delete this.setV;
					delete this.enable;
				}
			};
			tag.unbindG = function(t:MovieClip) {
				if (t != undefined) {
					var A = this.makeGravity.GA;
					var B = new Array();
					for (var i in A) {
						if (A[i].tag != t) {
							B.push(A[i]);
						}
					}
					this.makeGravity.GA = B;
					return true;
				} else {
					return false;
				}
			};
			tag.bindG = function(t:MovieClip, vv:Number) {
				if (t != undefined && t != this) {
					if (vv == undefined) {
						vv = 0;
					}
					var A = this.makeGravity.GA;
					for (var i in A) {
						if (A[i].tag == t) {
							return true;
						}
					}
					A.push({tag:t, v:vv});
					return true;
				} else {
					return false;
				}
			};
		}
		return tag;
	}
	//------------------------- 半透明闪动效果 tag-目标，time-闪动时间，pl-闪动频率，alpha1-透明度1，alpha2-透明度2
	public static function alphaFlash(tag:MovieClip, time:Number, pl:Number, alpha1:Number, alpha2:Number):Object {
		if (tag == undefined) {
			return null;
		}
		if (alpha1<0 || alpha1 == undefined) {
			alpha1 = tag._alpha*0.8;
		}
		if (alpha2<0 || alpha2 == undefined) {
			alpha2 = tag._alpha*0.2;
		}
		if (pl<0 || pl == undefined) {
			pl = 40;
		}
		if (time<0 || time == undefined) {
			time = 0.5;
		}
		var objName:String = "alphaFlash";
		var obj:String = objName+(int(Math.random()*1000)).toString();
		while (tag[obj] != undefined) {
			obj = objName+(int(Math.random()*1000)).toString();
		}
		tag[obj] = {};
		tag[obj].al1 = alpha1;
		tag[obj].al2 = alpha2;
		tag[obj].tag = tag;
		tag[obj].tagAl = tag._alpha;
		tag[obj].time = time*1000;
		tag[obj].pl = pl;
		tag[obj]._fx = true;
		tag[obj].stop = function() {
			this.stopf = true;
		};
		tag[obj]._alphaFlashFun = function(me) {
			if (eval(me.tag) == undefined) {
				me.stopf = true;
			}
			if (me.time<=0 || me.stopf == true) {
				me.tag._alpha = me.tagAl;
				clearInterval(me.InterTime);
				delete me;
				return;
			}
			if (me._fx) {
				me.tag._alpha = me.al1;
			} else {
				me.tag._alpha = me.al2;
			}
			me._fx = !me._fx;
			me.time -= me.pl;
		};
		//end effectFun
		tag[obj].InterTime = setInterval(tag[obj]._alphaFlashFun, pl, tag[obj]);
		return tag[obj];
	}
	//------------------------- 振动效果  tag-目标，way:方式（s竖、h横、b两者），h-振幅，pl-振动频率
	public static function quiver(tag:MovieClip, way:String, h:Number, pl:Number):Object {
		if (tag == undefined) {
			return null;
		}
		if (way != "s" && way != "h" && way != "b") {
			way = "b";
		}
		if (h<0 || h == undefined) {
			h = 20;
		}
		if (pl<0 || pl == undefined) {
			pl = 20;
		}
		var objName:String = "_quiver";
		var obj:String = objName;
		tag.stopQuiver(tag[objName]);
		tag.stopQuiver = function(obj:Object) {
			this._x = obj.tx;
			this._y = obj.ty;
			delete obj;
			delete this.stopQuiver;
			clearInterval(obj.InterTime);
		};
		tag[obj] = {};
		tag[obj]._fx = 0;
		tag[obj].h = h;
		tag[obj].way = way;
		tag[obj].tag = tag;
		tag[obj].tx = tag._x;
		tag[obj].ty = tag._y;
		tag[obj].stop = function() {
			this.stopf = true;
		};
		//------------------------ 竖向振动
		if (way == "s") {
			tag[obj]._quiverFun = function(me:Object) {
				if (eval(me.tag) == undefined) {
					me.stopf = true;
				}
				if (Math.abs(me.h)<0.1 || me.stopf == true) {
					me.tag._x = me.tx;
					me.tag._y = me.ty;
					delete me.stopQuiver;
					clearInterval(me.InterTime);
					delete me;
				} else {
					switch (me._fx) {
					case 0 :
						me.h *= 0.75;
						me.tag._y += me.h;
						me._fx = 1;
						break;
					case 1 :
						me.tag._y -= me.h;
						me.h = -me.h;
						me._fx = 0;
						break;
					}
				}
			};
		}
		//------------------------ 横向振动
		if (way == "h") {
			tag[obj]._quiverFun = function(me:Object) {
				if (eval(me.tag) == undefined) {
					me.stopf = true;
				}
				if (Math.abs(me.h)<0.1 || me.stopf == true) {
					me.tag._x = me.tx;
					me.tag._y = me.ty;
					delete me.stopQuiver;
					clearInterval(me.InterTime);
					delete me;
				} else {
					switch (me._fx) {
					case 0 :
						me.h *= 0.75;
						me.tag._x += me.h;
						me._fx = 1;
						break;
					case 1 :
						me.tag._x -= me.h;
						me.h = -me.h;
						me._fx = 0;
						break;
					}
				}
			};
		}
		//------------------------ 横、竖向都振动
		if (way == "b") {
			tag[obj]._quiverFun = function(me:Object) {
				if (eval(me.tag) == undefined) {
					me.stopf = true;
				}
				if (Math.abs(me.h)<0.1 || me.stopf == true) {
					me.tag._x = me.tx;
					me.tag._y = me.ty;
					delete me.stopQuiver;
					clearInterval(me.InterTime);
					delete me;
				} else {
					switch (me._fx) {
					case 0 :
						me.h *= 0.75;
						me.tag._y += me.h;
						me.tag._x -= me.h;
						me._fx = 1;
						break;
					case 1 :
						me.tag._x += 2*me.h;
						me._fx = 2;
						break;
					case 2 :
						me.tag._x -= 2*me.h;
						me.tag._y -= 2*me.h;
						me._fx = 3;
						break;
					case 3 :
						me.tag._x += 2*me.h;
						me._fx = 4;
						break;
					case 4 :
						me.tag._x -= me.h;
						me.tag._y += me.h;
						me._fx = 0;
						break;
					}
				}
			};
		}
		tag[obj].InterTime = setInterval(tag[obj]._quiverFun, pl, tag[obj]);
		return tag[obj];
	}
	//-------------------------------------------------  HELP 助
	public static function HELP() {
		var h:String = new String();
		h += "-------------  HELP  --------------\r";
		h += "createGravity(tag:MovieClip, g:Number):MovieClip\r";
		h += "创建重力场 tag-重力场系统生成位置，g-重力场加速度\r";
		h += "返回效果MovieClip，可用MovieClip.bind(MovieClip)动态绑定重力影响对象，可用MovieClip.unbind(MovieClip)动态取消重力绑定，可用MovieClip.setV(MovieClip,v)设定指定mc的即时速度。\r";
		h += "\r";
		h += "alphaFlash(tag:MovieClip, time:Number, pl:Number, alpha1:Number, alpha2:Number):Object\r";
		h += "半透明闪动效果 tag-目标，time-闪动时间，pl-闪动频率，alpha1-透明度1，alpha2-透明度2\r";
		h += "返回效果Object，可以用该Obj.stop方法停止特效\r";
		h += "\r";
		h += "quiver(tag:MovieClip, way:String, h:Number, pl:Number)\r";
		h += "振动效果  tag-目标，way:方式（s竖、h横、b两者），h-振幅，pl-振动频率\r";
		h += "返回效果Object，可以用该Obj.stop方法停止特效\r";
		h += "\r";
		h += "createShadow(tag:MovieClip, n:Number, pl:Number,alpha:Number):Object\r";
		h += "残影系统  tag-要加残影的目标，n-残影数量，pl-残影拖尾长度，alpha-起始透明度\r";
		h += "返回效果Object，可以用该Obj.stop方法停止特效\r";
		h += "\r";
		h += "createSwordShadow(tag:MovieClip, l:Number, color:String, n:Number, parent:MovieClip):Object\r";
		h += "剑光系统  tag-剑，l-剑长度, color-颜色，n-剑光长度，parent-剑光显示位置\r";
		h += "返回效果Object，可以用该Obj.stop方法停止特效\r";
		h += "\r";
		h += " createLight(tag:MovieClip, x0:Number, y0:Number, x1:Number, y1:Number, color:String, alpha:Number, n:Number, once:Boolean, l:Boolean):Object\r";
		h += "创建闪电 tag-闪电出现的位置, x0-起始点X, y0-起始点Y, x1-终点X, y1-终点Y, color-着色(默认浅蓝), alpha-透明度(默认100), n-电光折数(默认8折), once-是否只闪动1帧(默认不是), l-要不要加上光晕(默认是有的)\r";
		h += "\r";
		h += "createParticle(tag:MovieClip):Object\r";
		h += "创建粒子系统  tag-系统产生位置\r";
		h += "返回OBJECT类型特效系统体\r";
		h += "可以用以下方法:\r";
		h += "obj.radialParticle2 = function(link:String, x:Number, y:Number, rv:Number, va:Number, color:String, life:Number, g:Number, n:Number, cy:Boolean)\r";
		h += "放射性粒子(溅射性火星)   link-用于火星部件的LINKAGE, x-发射点X, y-发射点Y, rv-速度向量值, va-加速度向量值, color-默认火星色彩值, life-生命衰减值, g-重力加速度, n-火星数量, cy-是否有火星残影\r";
		h += "\r";
		h += "\r";
		//h+="\r";
		//h+="\r";
		//h+="\r";
		//h+="\r";
		//h+="\r";
		//h+="\r";
		//h+="\r";
		//h+="\r";
		h += "-------------  HELP  --------------\r";
		trace(h);
	}
}
